Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow alternate nodejs binaries #7405

Merged
merged 2 commits into from
Mar 27, 2019
Merged

Conversation

codealchemy
Copy link
Contributor

Problem

Attempting to use the latest node LTS (10.15.3 - the latest LTS released March 5th) fails to install in pants as it seems the binary is not in pants' s3 - as seen in the error returned by pants:

Fetch of https://binaries.pantsbuild.org/bin/node/mac/10.13/v10.15.3/node.tar.gz failed with status code 404

The issue of binaries in s3 has come up before in another context (the motivation there was related to bandwidth costs, not unavailable binaries), and a solution was implemented for go and llvm in #5780.

Solution

This continues the work done in the #5780, leveraging the BinaryToolUrlGenerator to allow node binaries to be fetched from nodejs.org (see full list of binaries for the latest LTS release here).

Result

Users can now use any supported node release from nodejs.org - verified locally (on a Mac using the latest LTS)

Copy link
Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@stuhood
Copy link
Member

stuhood commented Mar 19, 2019

Thanks! Delegating to @blorente , who is going to be looking at some other nodes.js stuff this week.

@stuhood stuhood removed the request for review from nsaechao March 19, 2019 19:23
Copy link
Contributor

@cosmicexplorer cosmicexplorer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I've been meaning to do this for each of our no-op scripts in https://github.com/pantsbuild/binaries but haven't gotten around to it. I'm pretty enthusiastic about this, it's not clear that other build tools decide that reliably providing specific versions of the tools they rely on is part of their purview and avoiding having to re-provision your laptop/CI environment for every single tool you want to use is part of why I want to write build tools in the first place.

Copy link
Contributor

@blorente blorente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks great :)

@codealchemy codealchemy force-pushed the node-alt-binary branch 2 times, most recently from f0bad1a to 6aee5f4 Compare March 26, 2019 17:26
The binary is extracted into a directory following the naming of the version and system id (ex. node-v8.11.3-darwin-x64)
@benjyw benjyw merged commit 6739a81 into pantsbuild:master Mar 27, 2019
@codealchemy codealchemy deleted the node-alt-binary branch March 27, 2019 22:15
stuhood pushed a commit that referenced this pull request Aug 13, 2019
### Problem (and solution)

Same as #7405

[Slack thread](https://pantsbuild.slack.com/archives/C046T6T9U/p1565633047078400) that highlighted this issue.

### Result

Users can now use any supported `yarn` release.

Related `binaries` repo script for building yarn [`here`](https://github.com/pantsbuild/binaries/blob/master/build-yarnpkg.sh).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants